'use strict';

const Service = require('egg').Service;
const dayjs = require('dayjs');

class BaseService extends Service {
  error(err, type = 'Service Error') {
    this.logger.error(`${dayjs().format('YYYY-MM-D H:m:s')}   ${type}   ${err}`);
  }
}

module.exports = BaseService;
